package com.ruoyi.zsyh.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.IdWorker;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.zsyh.mapper.ZsyhPartsApplyRecordMapper;
import com.ruoyi.zsyh.domain.ZsyhPartsApplyRecord;
import com.ruoyi.zsyh.service.IZsyhPartsApplyRecordService;
import com.ruoyi.common.core.text.Convert;

/**
 * 补助金沟通记录表Service业务层处理
 * 
 * @author yuexl
 * @date 2022-08-17
 */
@Service
public class ZsyhPartsApplyRecordServiceImpl implements IZsyhPartsApplyRecordService 
{
    @Autowired
    private ZsyhPartsApplyRecordMapper zsyhPartsApplyRecordMapper;

    /**
     * 查询补助金沟通记录表
     * 
     * @param id 补助金沟通记录表ID
     * @return 补助金沟通记录表
     */
    @Override
    public ZsyhPartsApplyRecord selectZsyhPartsApplyRecordById(String id)
    {
        return zsyhPartsApplyRecordMapper.selectZsyhPartsApplyRecordById(id);
    }

    /**
     * 查询补助金沟通记录表列表
     * 
     * @param zsyhPartsApplyRecord 补助金沟通记录表
     * @return 补助金沟通记录表
     */
    @Override
    public List<ZsyhPartsApplyRecord> selectZsyhPartsApplyRecordList(ZsyhPartsApplyRecord zsyhPartsApplyRecord)
    {
        return zsyhPartsApplyRecordMapper.selectZsyhPartsApplyRecordList(zsyhPartsApplyRecord);
    }

    /**
     * 新增补助金沟通记录表
     * 
     * @param zsyhPartsApplyRecord 补助金沟通记录表
     * @return 结果
     */
    @Override
    public int insertZsyhPartsApplyRecord(ZsyhPartsApplyRecord zsyhPartsApplyRecord)
    {
        zsyhPartsApplyRecord.setId(IdWorker.getId());
        zsyhPartsApplyRecord.setCreateTime(DateUtils.getNowDate());
        return zsyhPartsApplyRecordMapper.insertZsyhPartsApplyRecord(zsyhPartsApplyRecord);
    }

    /**
     * 修改补助金沟通记录表
     * 
     * @param zsyhPartsApplyRecord 补助金沟通记录表
     * @return 结果
     */
    @Override
    public int updateZsyhPartsApplyRecord(ZsyhPartsApplyRecord zsyhPartsApplyRecord)
    {
        return zsyhPartsApplyRecordMapper.updateZsyhPartsApplyRecord(zsyhPartsApplyRecord);
    }

    /**
     * 删除补助金沟通记录表对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteZsyhPartsApplyRecordByIds(String ids)
    {
        return zsyhPartsApplyRecordMapper.deleteZsyhPartsApplyRecordByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除补助金沟通记录表信息
     * 
     * @param id 补助金沟通记录表ID
     * @return 结果
     */
    @Override
    public int deleteZsyhPartsApplyRecordById(String id)
    {
        return zsyhPartsApplyRecordMapper.deleteZsyhPartsApplyRecordById(id);
    }
}
